package cn.java63.computer;
//电脑
public class Computer {
    private Monitor monitor;//显示器
    private Chassis chassis;//机箱

    public void setMonitor(Monitor monitor) {
        this.monitor = monitor;
    }

    public void setChassis(Chassis chassis) {
        this.chassis = chassis;
    }

    @Override
    public String toString() {
        return "Computer{" +
                "显示器=" + monitor.getResolution() +
                ", 机箱=" + chassis.get() +
                '}';
    }
}
